<%= polaris_box(
  padding_inline_start: "0",
  padding_inline_end: "0",
  padding_block_start: "5",
  padding_block_end: "16",
  **@system_arguments
) do %>
  <%= polaris_vertical_stack(inline_align: :center) do %>
    <img src="<%= @image %>" role="presentation" class="<%= @image_contained_class %>">

    <%= polaris_box(max_width: @full_width? "100%" : "400px") do %>
      <%= polaris_vertical_stack(inline_align: :center) do %>
        <% if @heading.present? || content.present? %>
          <%= polaris_box(padding_block_end: "6") do %>
            <% if @heading.present? %>
              <%= polaris_box(padding_block_end: "4") do %>
                <%= polaris_text(
                  variant: @within == :container ? :headingLg : :headingXl,
                  as: :p,
                  alignment: :center
                ) do %>
                  <%= @heading %>
                <% end %>
              <% end %>
            <% end %>
            <% if content.present? %>
              <%= polaris_text(as: :span, color: :subdued, alignment: :center) do %>
                <%= content %>
              <% end %>
            <% end %>
          <% end %>
        <% end %>
        <% if primary_action.present? || secondary_action.present? %>
          <%= polaris_horizontal_stack(align: :center, gap: "2") do %>
            <% if secondary_action.present? %>
              <%= secondary_action %>
            <% end %>
            <% if primary_action.present? %>
              <%= primary_action %>
            <% end %>
          <% end %>
        <% end %>
        <% if footer.present? %>
          <%= polaris_box(padding_block_start: "4") do %>
            <%= polaris_text(as: :span, color: :subdued, alignment: :center) do %>
              <%= footer %>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>

    <% if unsectioned_content.present? %>
      <%= unsectioned_content %>
    <% end %>
  <% end %>
<% end %>
